<template>
    <div>

        <el-menu  style="width: 200px;min-height: calc( 100vh - 50px);background-color: rgba(192,196,204,0.43)"
                 :default-active="path" router
                 class="el-menu-vertical-demo">
            <el-sub-menu index="1"  >
                <template #title style="background-color: #909399">
                    <i class="el-icon-location"></i>
                    <h3>个人中心</h3>
                </template>
                <el-menu-item index="/user" style="border-bottom: #ccc 1px solid">用户信息</el-menu-item>
                <el-menu-item index="/browsingHistory"  style="border-bottom: #ccc 1px solid">浏览历史</el-menu-item>
                <el-menu-item index="/editPassword"  style="border-bottom: #ccc 1px solid">修改密码</el-menu-item>
                <el-menu-item index="/favorite"  style="border-bottom: #ccc 1px solid">收藏夹</el-menu-item>
                <el-menu-item index="/userMessage"  style="border-bottom: #ccc 1px solid">留言</el-menu-item>
            </el-sub-menu>

        </el-menu>
    </div>
</template>

<script>
    import request from "../utils/request";

    export default {
        name: "Aside",
        data() {
            return {
                user: {},
                path: this.$route.path
            }
        },
        created() {
            // let userStr = sessionStorage.getItem("user") || "{}"
            // this.user = JSON.parse(userStr)
            //
            // request.post("/user/getUserById" , this.user.id).then(res =>{
            //     console.log(1111111111)
            //     console.log(res)
            //     if (res.code === '0'){
            //         this.user = res.data
            //     }
            // })


        }
    }
</script>

<style>

</style>
